package org.way.base.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.way.base.dto.GlobalDTO;

@RestControllerAdvice
public class GlobalExceptionHandle {

    @ExceptionHandler
    public GlobalDTO<String> handlerException(Exception e) {
        return GlobalDTO.error(e.getMessage());
    }
}
